Conventionally, there has been an apparatus for moving an object such as a player character, which apparatus is, for example, a personal computer, game apparatus or the like which is operated by a pointing device for inputting a coordinate point on a display screen. For example, Japanese Laid-Open Patent Publication No. 2000-181617 (hereinafter, referred to as Patent Document 1) discloses a scroll control method for performing a pointing operation, e.g., moving a cursor or scrolling a screen, based on an input of a coordinate point designated by a touch pad which is a pointing device.
However, the method disclosed by the above Patent Document 1 requires at least two areas to be used in order to perform both screen scroll and cursor control by touch operations. This increases the number of operations to be performed. Further, a scroll area is not provided in such a position, in relation to a display screen, as to allow the user to perform screen scrolling intuitively and easily. Therefore, when moving an object in accordance with a coordinate point input by using the method disclosed by the Patent Document 1, the user is not allowed to perform an intuitive operation input.
Therefore, feature of certain exemplary embodiments is to provide an information processing apparatus and a storage medium for storing an information processing program, which allow, in operations for moving an object by using coordinate point inputs provided from a pointing device, operation inputs to be performed more easily and intuitively. Another feature of certain exemplary embodiments is to provide an information processing apparatus and a storage medium storing an information processing program, which allow both a moving direction and a destination of the object to be specified by a series of operation inputs.
Certain exemplary embodiments have the following aspects to achieve the features mentioned above. Note that reference numerals, step numbers and the like indicated between parentheses are merely provided to facilitate the understanding of the certain exemplary embodiments and are not intended to be limiting in any way.
A first aspect is an information processing apparatus (1) for displaying a virtual space on a display device (12) and moving an object (PC) in the virtual space in accordance with an output from a pointing device (15), which pointing device outputs an input coordinate point (TP) based on a screen coordinate system of the display device in accordance with an operation performed by a user. The information processing apparatus comprises coordinate point obtaining means (CPU core 21 performing steps 53 and 93; hereinafter, only step numbers will be mentioned), control selection means (S52, S92), first control means (S53 to S55, S57, S58, S94, S95), second control means (S56 to S58, S96 to S98) and display control means (S59, S99). The coordinate point obtaining means obtains the input coordinate point from the pointing device. The control selection means selects, based on an operation performed by the user, either one of a first control and a second control which is different from the first control. The first control means calculates, when the control selection means has selected the first control, a movement vector (Pm, M) based on the input coordinate point and a predetermined coordinate point (Ppc, center of the screen), and moves a display area of the virtual space in accordance with the movement vector, which display area is displayed on the display device. The second control means moves, when the control selection means has selected the second control, the object to a position (Pm) in the virtual space, the position corresponding to the input coordinate point. The display control means causes the display device to display the virtual space within the display area. Here, the pointing device is an input device for designating an input position or coordinate point on a screen. Such a pointing device is realized in, e.g., a system for detecting a position on a screen which is pointed by a touch panel, mouse, track pad, track ball, a housing of a game controller, or the like.
In a second aspect based on the first aspect, the pointing device is a touch panel (15) covering a display screen of the display device. The coordinate point obtaining means obtains, as the input coordinate point, a touch coordinate point (TP) outputted from the touch panel. The control selection means selects the first control when the user is performing a touch operation on the touch panel, and selects the second control when the user is not performing a touch operation on the touch panel. When the touch panel is in a state of being touched, the first control means calculates the movement vector based on a current touch coordinate point obtained by the coordinate point obtaining means and the a predetermined coordinate point. When the touch panel is in a state of not being touched, the second control means moves the object to a position in the virtual space, the position corresponding to the touch coordinate point which the coordinate point obtaining means has obtained immediately before the touch-panel has entered the state of not being touched.
In a third aspect based on the second aspect, when the touch panel is in the state of being touched, the first control means moves the object in the virtual space in accordance with the movement vector, and then, based on a position of the object, moves the display area of the virtual space which is displayed on the display device.
In a fourth aspect based on the second aspect, the second control means further moves, based on the position of the object in the virtual space, the display area of the virtual space which is displayed on the display device.
In a fifth aspect based on the third aspect, the first control means determines, based on a position of a touch coordinate point on the display screen of the display device, a moving velocity (V) at which the object moves within the virtual space.
In a sixth aspect based on the second aspect, the movement vector is a vector from a predetermined coordinate point on the touch panel to the touch coordinate point.
In a seventh aspect based on the second aspect, the movement vector is a vector from a predetermined coordinate point in the virtual space to a coordinate point in the virtual space which coincides with the touch coordinate point.
In an eighth aspect based on the second aspect, the movement vector is a vector from a coordinate point indicating a position of the object placed in the virtual space to a coordinate point in the virtual space which coincides with the touch coordinate point.
In a ninth aspect based on the second aspect, the first control means: calculates the movement vector from a coordinate point indicating a position of the object placed in the virtual space to a coordinate point in the virtual space which coincides with the current touch coordinate point obtained by the coordinate point obtaining means; moves the object within the virtual space in accordance with the movement vector; and moves the display area of the virtual space such that the position of the object is at a center of the display area. The second control means moves the object to a position in the virtual space, which position coincides with the touch coordinate point which the coordinate point obtaining means has obtained immediately before the touch-panel has entered the state of not being touched, and moves the display area of the virtual space such that the position of the object is at the center of the display area.
An eleventh aspect is an information processing apparatus for displaying a virtual space on a display device and moving an object in the virtual space in accordance with an output from a pointing device, which pointing device outputs an input coordinate point based on a screen coordinate system of the display device in accordance with an operation performed by a user. The information processing apparatus comprises coordinate point obtaining means (S113), control selection means (S112), first control means (S114, S115), second control means (S116 to S118) and display control means (S119). The coordinate point obtaining means obtains the input coordinate point from the pointing device. The control selection means selects, based on an operation performed by the user, either one of a first control and a second control which is different from the first control. The first control means calculates, when the control selection means has selected the first control, a movement vector based on the an input coordinate point and a predetermined coordinate point, and moves the object within the virtual space in accordance with the movement vector. The second control means moves, when the control selection means has selected the second control, the object to a position in the virtual space, the position corresponding to the input coordinate point. The display control means causes the display device to display a display area of the virtual space.
In a twelfth aspect based on the eleventh aspect, the pointing device is a touch panel covering a display screen of the display device. The coordinate point obtaining means obtains, as the input coordinate point, a touch coordinate point outputted from the touch panel. The control selection means selects the first control when the user is performing a touch operation on the touch panel, and selects the second control when the user is not performing a touch operation on the touch panel. When the touch panel is in a state of being touched, the first control means calculates the movement vector based on a current touch coordinate point obtained by the coordinate point obtaining means and the predetermined coordinate point. When the touch panel is in a state of not being touched, the second control means moves the object to a position in the virtual space, the position corresponding to the touch coordinate point which the coordinate point obtaining means has obtained immediately before the touch-panel has entered the state of not being touched.
In tenth and thirteenth aspects respectively based on the first and eleventh aspects, the control selection means selects the first control when a predetermined operation signal different from the input coordinate point is being inputted, and selects the second control when the predetermined operation signal is not inputted. When the predetermined operation signal is being inputted, the first control means calculates the movement vector based on a current input coordinate point obtained by the coordinate point obtaining means and the predetermined coordinate point. When the predetermined operation signal is not inputted, the second control means moves the object to a position in the virtual space, the position corresponding to the input coordinate point which the coordinate point obtaining means has obtained immediately before the predetermined operation signal has ceased to be inputted. Here, referred to as the predetermined operation signal is a signal indicating a presence, absence or change of an input which is different from a coordinate point input. For example, either one of the first and second controls is selected based on: whether or not an operation button provided on a controller is being pressed; a change in a signal from a detection unit (such as an acceleration sensor) provided on the controller; or a change in a voice inputted to voice input means such as a microphone.
A fourteenth aspect is a storage medium storing an information processing program to be executed by a computer (21) of an information processing apparatus for displaying a virtual space on a display device and moving an object in the virtual space in accordance with an output from a pointing device, which pointing device outputs an input coordinate point based on a screen coordinate system of the display device in accordance with an operation performed by a user. The information processing program causes the computer to function as coordinate point obtaining means, control selection means, first control means, second control means and display control means. The coordinate point obtaining means obtains the input coordinate point from the pointing device. The control selection means selects, based on an operation performed by the user, either one of a first control and a second control which is different from the first control. The first control means calculates, when the control selection means has selected the first control, a movement vector based on the input coordinate point and a predetermined coordinate point, and moves a display area of the virtual space in accordance with the movement vector, which display area is displayed on the display device. The second control means moves, when the control selection means has selected the second control, the object to a position in the virtual space, the position corresponding to the input coordinate point. The display control means causes the display device to display the virtual space within the display area.
A twenty-fourth aspect is a storage medium storing an information processing program to be executed by a computer of an information processing apparatus for displaying a virtual space on a display device and moving an object in the virtual space in accordance with an output from a pointing device, which pointing device outputs an input coordinate point based on a screen coordinate system of the display device in accordance with an operation performed by a user. The information processing program causes the computer to function as coordinate point obtaining means, control selection means, first control means, second control means and display control means. The coordinate point obtaining means obtains the input coordinate point from the pointing device. The control selection means selects, based on an operation performed by the user, either one of a first control and a second control which is different from the first control. The first control means calculates, when the control selection means has selected the first control, a movement vector based on the input coordinate point and a predetermined coordinate point, and moves the object within the virtual space in accordance with the movement vector. The second control means moves, when the control selection means has selected the second control, the object to a position in the virtual space, the position corresponding to the input coordinate point. The display control means causes the display device to display a display area of the virtual space.
In fifteenth and twenty-fifth aspects respectively based on the fourteenth and twenty-fourth aspects, the pointing device is a touch panel covering a display screen of the display device. The coordinate point obtaining means obtains, as the input coordinate point, a touch coordinate point outputted from the touch panel. The control selection means selects the first control when the user is performing a touch operation on the touch panel, and selects the second control when the user is not performing a touch operation on the touch panel. When the touch panel is in a state of being touched, the first control means calculates the movement vector based on a current touch coordinate point obtained by the coordinate point obtaining means and the predetermined coordinate point. When the touch panel is in a state of not being touched, the second control means moves the object to a position in the virtual space, the position corresponding to the touch coordinate point which the coordinate point obtaining means has obtained immediately before the touch-panel has entered the state of not being touched.
In sixteenth and twenty-sixth aspects respectively based on the fifteenth and twenty-fifth aspects, when the touch panel is in the state of being touched, the first control means moves the object in the virtual space in accordance with the movement vector, and then, based on a position of the object, moves the display area of the virtual space which is displayed on the display device.
In seventeenth and twenty-seventh aspects respectively based on the fifteenth and twenty-fifth aspects, the second control means further moves, based on the position of the object in the virtual space, the display area of the virtual space, which is displayed on the display device.
In eighteenth and twenty-eighth aspects respectively based on the sixteenth and twenty-sixth aspects, the first control means determines, based on a position of a touch coordinate point on the display screen of the display device, a moving velocity at which the object moves within the virtual space.
In nineteenth and twenty-ninth aspects respectively based on the fifteenth and twenty-fifth aspects, the movement vector is a vector from a predetermined coordinate point on the touch panel to the touch coordinate point.
In twentieth and thirtieth aspects respectively based on the fifteenth and twenty-fifth aspects, the movement vector is a vector from a predetermined coordinate point in the virtual space to a coordinate point in the virtual space which coincides with the touch coordinate point.
In twenty-first and thirty-first aspects respectively based on the fifteenth and twenty-fifth aspects, the movement vector is a vector from a coordinate point indicating a position of the object placed in the virtual space to a coordinate point in the virtual space which coincides with the touch coordinate point.
In twenty-second and thirty-second aspects respectively based on the fifteenth and twenty-fifth aspects, the first control means: calculates the movement vector from a coordinate point indicating a position of the object placed in the virtual space to a coordinate point in the virtual space which coincides with the current touch coordinate point obtained by the coordinate point obtaining means; moves the object within the virtual space in accordance with the movement vector; and moves the display area of the virtual space such that the position of the object is at a center of the display area. The second control means moves the object to a position in the virtual space, which position coincides with the touch coordinate point which the coordinate point obtaining means has obtained immediately before the touch-panel has entered the state of not being touched, and moves the display area of the virtual space such that the position of the object is at the center of the display area.
In twenty-third and thirty-third aspects respectively based on the fourteenth and twenty-fourth aspects, the control selection means selects the first control when a predetermined operation signal different from the input coordinate point is being inputted, and selects the second control when the predetermined operation signal is not inputted. When the predetermined operation signal is being inputted, the first control means calculates the movement vector based on a current input coordinate point obtained by the coordinate point obtaining means and the predetermined coordinate point. When the predetermined operation signal is not inputted, the second control means moves the object to a position in the virtual space, the position corresponding to the input coordinate point which the coordinate point obtaining means has obtained immediately before the predetermined operation signal has ceased to be inputted.
According to the above first aspect, an operation for continuously moving the display area and an operation for specifying a destination of the object can be both performed by a series of operations performed by a user. In other words, the user is allowed to specify the destination of the object while changing the display area displayed on the display screen, and perform such an operation intuitively.
The above third aspect enables an operation, for moving the display area in accordance with the position of the object while continuously moving the object, to be performed in response to the touch operation performed on the touch panel.
The above fourth aspect allows an operation, for moving the display area in accordance with the position of the object while moving the object to a position at which a touch operation has been performed immediately before the touch panel has entered the state of not being touched, to be performed in response to a cessation of the touch operation on the touch panel.
According to the above fifth aspect, the moving velocity of the object changes based on a position touched by the user. For example, a game process, for causing the moving velocity which is set when an outer edge portion of the touch panel is touched to be higher than the moving velocity which is set when a position near the center of the touch panel is touched, is allowed to be performed.
According to the above sixth aspect, the object can be moved in accordance with the movement vector based on the touch panel coordinate system.
According to the above seventh aspect, the object can be moved in accordance with the movement vector based on a coordinate system set in the virtual space.
According to the above eighth aspect, in the coordinate system set in the virtual space, the object can be moved in accordance with the movement vector based on the position of the object placed in the virtual space.
The above ninth aspect enables an operation, for moving the display area in accordance with the position of the object while continuously moving the object, to be performed in response to the touch operation performed on the touch panel, and also enables an operation, for moving the display area in accordance with the position of the object while moving the object to a position at which a touch operation has been performed immediately before the touch panel has entered the state of not being touched, to be performed in response to a cessation of the touch operation on the touch panel.
According to the above eleventh aspect, an operation for continuously moving the object and an operation for specifying the destination of the object can be both performed by a series of operations performed by the user. In other words, the user is allowed to specify the destination of the object while continuously moving the object, and perform such an operation intuitively.
According to the above second and twelfth aspects, in the case where a touch panel is used as a pointing device, a plurality of operation instructions can be intuitively given by a series of touch operations from a start of a touch operation to a time point immediately after the touch panel has entered the state of not being touched.
According to the above tenth and thirteenth aspects, a plurality of operation instructions can be intuitively given based on a series of coordinate point input operations, by selecting the first control or second control in accordance with whether or not an operation signal is being inputted, for example, whether or not an operation button is being pressed.
Further, according to the storage medium storing the information processing program of certain exemplary embodiments, the same effects as those of the above-described information processing apparatus can be obtained.
These and other features, aspects and advantages of the certain exemplary embodiments described herein will become more apparent from the following detailed description when taken in conjunction with the accompanying drawings.